package models

import "time"

type Community struct {
	CommunityID   uint64 `gorm:"column:community_id" json:"community_id"`
	CommunityName string `gorm:"column:community_name" json:"community_name"`
}

type CommunityDetail struct {
	CommunityID   uint64    `gorm:"column:community_id" json:"community_id"`
	CommunityName string    `gorm:"column:community_name" json:"community_name"`
	Introduction  string    `gorm:"column:introduction" json:"introduction,omitempty"`
	CreateTime    time.Time `gorm:"column:create_time" json:"create_time"`
}

// 将 CommunityDetail 的表名设置为 `community`
func (CommunityDetail) TableName() string {
	return "community"
}

func (Community) TableName() string {
	return "community"
}
